From: Jonas Dreßler Date: Fri, 19 Feb 2021 18:20:32 +0000 (+0100) Subject: workspacesView: Take scale factor into account to calculate spacing X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~253 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=63a96a7111a5ba775eafffaa9dc97754a9752584;p=gnome-shell.git workspacesView: Take scale factor into account to calculate spacing This is a statically defined size and we need to adjust for scaleFactor ourselves, so do that and multiply those two values by the scale factor. Part-of: --- diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js index c4b3d8252..fb9eafb0a 100644 --- a/js/ui/workspacesView.js +++ b/js/ui/workspacesView.js @@ -228,8 +228,10 @@ class WorkspacesView extends WorkspacesViewBase { } const spacing = (availableSpace - workspaceSize * 0.05) * (1 - fitMode); + const { scaleFactor } = St.ThemeContext.get_for_stage(global.stage); - return Math.clamp(spacing, WORKSPACE_MIN_SPACING, WORKSPACE_MAX_SPACING); + return Math.clamp(spacing, WORKSPACE_MIN_SPACING * scaleFactor, + WORKSPACE_MAX_SPACING * scaleFactor); } _getWorkspaceModeForOverviewState(state) {